{
	"ProcessTemplates": [
		{
			"Name": "Magento to Dynamics365 - Customers",
			"Modified": "2024-07-11T11:54:06.1823004",
			"Modifier": "janne.pennanen@frends.com",
			"Tags": [
				"Magento",
				"Dynamics365"
			],
			"TemplateProcessTags": [],
			"Description": "This template process fetches customer information from Magento, and inserts or updates the customers to Dynamics365 as contacts.",
			"Version": 1,
			"UniqueIdentifier": "0d7c8495-0d86-4539-a57b-699254302d21",
			"ProcessVariablesJson": "{\"MagentoBaseUrl\":{\"Value\":\"\\\"\\\"\",\"IsSecret\":false,\"Mode\":\"text\",\"Description\":\"The base URL for Magento.\"},\"MagentoUser\":{\"Value\":\"\\\"myUsername\\\"\",\"IsSecret\":false,\"Mode\":\"text\",\"Description\":\"The username for Magento.\"},\"MagentoPassword\":{\"Value\":\"\\\"myPassword\\\"\",\"IsSecret\":true,\"Mode\":\"text\",\"Description\":\"The password for the Magento user.\"},\"Dynamics365ClientId\":{\"Value\":\"\\\"aaaaa-bbbbb-ccccc\\\"\",\"IsSecret\":false,\"Mode\":\"text\",\"Description\":\"The client ID for Dynamics365.\"},\"Dynamics365TenantId\":{\"Value\":\"\\\"11111-22222-33333\\\"\",\"IsSecret\":false,\"Mode\":\"text\",\"Description\":\"The tenant ID for Dynamics365.\"},\"Dynamics365ClientSecret\":{\"Value\":\"\\\"\\\"\",\"IsSecret\":true,\"Mode\":\"text\",\"Description\":\"The client secret for Dynamics365.\"},\"Dynamics365Url\":{\"Value\":\"\\\"https://<my-dynamics-instance>.dynamics.com\\\"\",\"IsSecret\":false,\"Mode\":\"text\",\"Description\":\"The URL to your Dynamics365 instance.\"}}",
			"ProcessInfo": {
				"Process": {
					"Name": "Magento to Dynamics365 - Customers",
					"Modified": "2024-07-11T11:54:06.1823004",
					"Modifier": "janne.pennanen@frends.com",
					"TagString": null,
					"Tags": [],
					"Description": "This template process fetches customer information from Magento, and inserts or updates the customers to Dynamics365 as contacts.",
					"Version": 1,
					"UniqueIdentifier": "076c1572-9f9c-4309-922b-6b37b10f5531",
					"GraphJson": null,
					"Bpmn": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<bpmn2:definitions xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:bpmn2=\"http://www.omg.org/spec/BPMN/20100524/MODEL\" xmlns:bpmndi=\"http://www.omg.org/spec/BPMN/20100524/DI\" xmlns:dc=\"http://www.omg.org/spec/DD/20100524/DC\" xmlns:di=\"http://www.omg.org/spec/DD/20100524/DI\" id=\"sample-diagram\" targetNamespace=\"http://bpmn.io/schema/bpmn\" xsi:schemaLocation=\"http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd\"><bpmn2:process id=\"Process_1\" isExecutable=\"false\"><bpmn2:startEvent id=\"StartEvent_1\" name=\"Manual\"><bpmn2:outgoing>Flow_0c5fkn9</bpmn2:outgoing></bpmn2:startEvent><bpmn2:task id=\"Activity_1yr0scy\" name=\"Obtain authorisation token from Magento\"><bpmn2:incoming>Flow_0c5fkn9</bpmn2:incoming><bpmn2:outgoing>Flow_1q7u17c</bpmn2:outgoing></bpmn2:task><bpmn2:sequenceFlow id=\"Flow_0c5fkn9\" sourceRef=\"StartEvent_1\" targetRef=\"Activity_1yr0scy\" /><bpmn2:exclusiveGateway id=\"Gateway_0lc9929\" name=\"Token received?\" default=\"Flow_0k7wg79\"><bpmn2:incoming>Flow_1q7u17c</bpmn2:incoming><bpmn2:outgoing>Flow_0r1iaz9</bpmn2:outgoing><bpmn2:outgoing>Flow_0k7wg79</bpmn2:outgoing></bpmn2:exclusiveGateway><bpmn2:sequenceFlow id=\"Flow_1q7u17c\" sourceRef=\"Activity_1yr0scy\" targetRef=\"Gateway_0lc9929\" /><bpmn2:task id=\"Activity_1cxmjw0\" name=\"Get customers from Magento\"><bpmn2:incoming>Flow_0r1iaz9</bpmn2:incoming><bpmn2:outgoing>Flow_1bmlwso</bpmn2:outgoing><bpmn2:property id=\"Property_0nlkdt7\" name=\"__targetRef_placeholder\" /><bpmn2:dataInputAssociation id=\"DataInputAssociation_0n53b8b\"><bpmn2:sourceRef>DataStoreReference_0n959pb</bpmn2:sourceRef><bpmn2:targetRef>Property_0nlkdt7</bpmn2:targetRef></bpmn2:dataInputAssociation></bpmn2:task><bpmn2:sequenceFlow id=\"Flow_0r1iaz9\" name=\"yes\" sourceRef=\"Gateway_0lc9929\" targetRef=\"Activity_1cxmjw0\" /><bpmn2:exclusiveGateway id=\"Gateway_12v39a6\" name=\"Get from Magento successful?\" default=\"Flow_0pzf9iy\"><bpmn2:incoming>Flow_1bmlwso</bpmn2:incoming><bpmn2:outgoing>Flow_0pzf9iy</bpmn2:outgoing><bpmn2:outgoing>Flow_1p3uohc</bpmn2:outgoing></bpmn2:exclusiveGateway><bpmn2:sequenceFlow id=\"Flow_1bmlwso\" sourceRef=\"Activity_1cxmjw0\" targetRef=\"Gateway_12v39a6\" /><bpmn2:intermediateThrowEvent id=\"Event_0ybcog9\" name=\"Throw error if getting customers from Magento failed\"><bpmn2:incoming>Flow_0pzf9iy</bpmn2:incoming><bpmn2:signalEventDefinition /></bpmn2:intermediateThrowEvent><bpmn2:sequenceFlow id=\"Flow_0pzf9iy\" name=\"no\" sourceRef=\"Gateway_12v39a6\" targetRef=\"Event_0ybcog9\" /><bpmn2:dataStoreReference id=\"DataStoreReference_0n959pb\" name=\"Magento\" /><bpmn2:scriptTask id=\"Activity_0vzgjbw\" name=\"Initialize error variable\"><bpmn2:incoming>Flow_1p3uohc</bpmn2:incoming><bpmn2:outgoing>Flow_1hhflbg</bpmn2:outgoing></bpmn2:scriptTask><bpmn2:sequenceFlow id=\"Flow_1p3uohc\" name=\"yes\" sourceRef=\"Gateway_12v39a6\" targetRef=\"Activity_0vzgjbw\" /><bpmn2:subProcess id=\"Activity_0l4u5gx\" name=\"For each Magento customer\"><bpmn2:incoming>Flow_1c2md4r</bpmn2:incoming><bpmn2:outgoing>Flow_006vj5a</bpmn2:outgoing><bpmn2:multiInstanceLoopCharacteristics isSequential=\"true\" /><bpmn2:startEvent id=\"Event_0c4jig0\"><bpmn2:outgoing>Flow_11h1gq8</bpmn2:outgoing></bpmn2:startEvent><bpmn2:exclusiveGateway id=\"Gateway_0g76zci\" name=\"Contact already exists?\" default=\"Flow_0rias41\"><bpmn2:incoming>Flow_1qgq0vb</bpmn2:incoming><bpmn2:outgoing>Flow_19zvcwp</bpmn2:outgoing><bpmn2:outgoing>Flow_0rias41</bpmn2:outgoing></bpmn2:exclusiveGateway><bpmn2:task id=\"Activity_1uzudpi\" name=\"Update contact on Dynamics365\"><bpmn2:incoming>Flow_19zvcwp</bpmn2:incoming><bpmn2:outgoing>Flow_0rcml44</bpmn2:outgoing><bpmn2:dataOutputAssociation id=\"DataOutputAssociation_0antgtg\"><bpmn2:targetRef>DataStoreReference_0db46lu</bpmn2:targetRef></bpmn2:dataOutputAssociation></bpmn2:task><bpmn2:sequenceFlow id=\"Flow_19zvcwp\" name=\"yes\" sourceRef=\"Gateway_0g76zci\" targetRef=\"Activity_1uzudpi\" /><bpmn2:task id=\"Activity_1ufc6oq\" name=\"Insert contact to Dynamics365\"><bpmn2:incoming>Flow_0rias41</bpmn2:incoming><bpmn2:outgoing>Flow_1uus1di</bpmn2:outgoing><bpmn2:dataOutputAssociation id=\"DataOutputAssociation_0yx5lq2\"><bpmn2:targetRef>DataStoreReference_0db46lu</bpmn2:targetRef></bpmn2:dataOutputAssociation></bpmn2:task><bpmn2:sequenceFlow id=\"Flow_0rias41\" name=\"no\" sourceRef=\"Gateway_0g76zci\" targetRef=\"Activity_1ufc6oq\" /><bpmn2:sequenceFlow id=\"Flow_11h1gq8\" sourceRef=\"Event_0c4jig0\" targetRef=\"Activity_1ek9eyy\" /><bpmn2:task id=\"Activity_1ek9eyy\" name=\"Get contact information from Dynamics365\"><bpmn2:incoming>Flow_11h1gq8</bpmn2:incoming><bpmn2:outgoing>Flow_112ghd3</bpmn2:outgoing><bpmn2:property id=\"Property_0mhqa4a\" name=\"__targetRef_placeholder\" /><bpmn2:dataInputAssociation id=\"DataInputAssociation_0gxa8zc\"><bpmn2:sourceRef>DataStoreReference_0k8ppre</bpmn2:sourceRef><bpmn2:targetRef>Property_0mhqa4a</bpmn2:targetRef></bpmn2:dataInputAssociation></bpmn2:task><bpmn2:dataStoreReference id=\"DataStoreReference_0db46lu\" name=\"Dynamics365\" /><bpmn2:exclusiveGateway id=\"Gateway_195oeq8\" name=\"Update successful?\" default=\"Flow_1qto8hb\"><bpmn2:incoming>Flow_0rcml44</bpmn2:incoming><bpmn2:outgoing>Flow_1qto8hb</bpmn2:outgoing><bpmn2:outgoing>Flow_1d44zlu</bpmn2:outgoing></bpmn2:exclusiveGateway><bpmn2:sequenceFlow id=\"Flow_0rcml44\" sourceRef=\"Activity_1uzudpi\" targetRef=\"Gateway_195oeq8\" /><bpmn2:exclusiveGateway id=\"Gateway_1ljcq36\" name=\"Insert successful?\" default=\"Flow_1r7vypo\"><bpmn2:incoming>Flow_1uus1di</bpmn2:incoming><bpmn2:outgoing>Flow_1r7vypo</bpmn2:outgoing><bpmn2:outgoing>Flow_037aabj</bpmn2:outgoing></bpmn2:exclusiveGateway><bpmn2:sequenceFlow id=\"Flow_1uus1di\" sourceRef=\"Activity_1ufc6oq\" targetRef=\"Gateway_1ljcq36\" /><bpmn2:endEvent id=\"Event_0pz6fnp\" name=\"Return if updating contact failed and add error to error variable\"><bpmn2:incoming>Flow_1qto8hb</bpmn2:incoming></bpmn2:endEvent><bpmn2:sequenceFlow id=\"Flow_1qto8hb\" name=\"no\" sourceRef=\"Gateway_195oeq8\" targetRef=\"Event_0pz6fnp\" /><bpmn2:endEvent id=\"Event_121tqwh\" name=\"Return if inserting contact failed and add error to error variable\"><bpmn2:incoming>Flow_1r7vypo</bpmn2:incoming></bpmn2:endEvent><bpmn2:sequenceFlow id=\"Flow_1r7vypo\" name=\"no\" sourceRef=\"Gateway_1ljcq36\" targetRef=\"Event_121tqwh\" /><bpmn2:exclusiveGateway id=\"Gateway_06zes8d\" name=\"Contact information gotten successfully?\" default=\"Flow_1vc6wh5\"><bpmn2:incoming>Flow_112ghd3</bpmn2:incoming><bpmn2:outgoing>Flow_1vc6wh5</bpmn2:outgoing><bpmn2:outgoing>Flow_1qgq0vb</bpmn2:outgoing></bpmn2:exclusiveGateway><bpmn2:sequenceFlow id=\"Flow_112ghd3\" sourceRef=\"Activity_1ek9eyy\" targetRef=\"Gateway_06zes8d\" /><bpmn2:endEvent id=\"Event_0q6wv3e\" name=\"Return if getting contact information failed and add error to error variable\"><bpmn2:incoming>Flow_1vc6wh5</bpmn2:incoming></bpmn2:endEvent><bpmn2:sequenceFlow id=\"Flow_1vc6wh5\" name=\"no\" sourceRef=\"Gateway_06zes8d\" targetRef=\"Event_0q6wv3e\" /><bpmn2:dataStoreReference id=\"DataStoreReference_0k8ppre\" name=\"Dynamics365\" /><bpmn2:sequenceFlow id=\"Flow_1qgq0vb\" name=\"yes\" sourceRef=\"Gateway_06zes8d\" targetRef=\"Gateway_0g76zci\" /><bpmn2:endEvent id=\"Event_0e0ioqo\" name=\"Increment update count\"><bpmn2:incoming>Flow_1d44zlu</bpmn2:incoming></bpmn2:endEvent><bpmn2:sequenceFlow id=\"Flow_1d44zlu\" name=\"yes\" sourceRef=\"Gateway_195oeq8\" targetRef=\"Event_0e0ioqo\" /><bpmn2:endEvent id=\"Event_0piztv3\" name=\"Increment insert count\"><bpmn2:incoming>Flow_037aabj</bpmn2:incoming></bpmn2:endEvent><bpmn2:sequenceFlow id=\"Flow_037aabj\" name=\"yes\" sourceRef=\"Gateway_1ljcq36\" targetRef=\"Event_0piztv3\" /></bpmn2:subProcess><bpmn2:endEvent id=\"Event_0k9a9xe\" name=\"Process complete, print update/insert counts and possible error messages\"><bpmn2:incoming>Flow_006vj5a</bpmn2:incoming></bpmn2:endEvent><bpmn2:sequenceFlow id=\"Flow_006vj5a\" sourceRef=\"Activity_0l4u5gx\" targetRef=\"Event_0k9a9xe\" /><bpmn2:scriptTask id=\"Activity_1slfbj6\" name=\"Initialize update count\"><bpmn2:incoming>Flow_1hhflbg</bpmn2:incoming><bpmn2:outgoing>Flow_1qda89b</bpmn2:outgoing></bpmn2:scriptTask><bpmn2:sequenceFlow id=\"Flow_1hhflbg\" sourceRef=\"Activity_0vzgjbw\" targetRef=\"Activity_1slfbj6\" /><bpmn2:scriptTask id=\"Activity_0log2c9\" name=\"Initialize insert count \"><bpmn2:incoming>Flow_1qda89b</bpmn2:incoming><bpmn2:outgoing>Flow_1c2md4r</bpmn2:outgoing></bpmn2:scriptTask><bpmn2:sequenceFlow id=\"Flow_1qda89b\" sourceRef=\"Activity_1slfbj6\" targetRef=\"Activity_0log2c9\" /><bpmn2:sequenceFlow id=\"Flow_1c2md4r\" sourceRef=\"Activity_0log2c9\" targetRef=\"Activity_0l4u5gx\" /><bpmn2:intermediateThrowEvent id=\"Event_0tp5xm1\" name=\"Throw error if obtaining token from Magento failed\"><bpmn2:incoming>Flow_0k7wg79</bpmn2:incoming><bpmn2:signalEventDefinition /></bpmn2:intermediateThrowEvent><bpmn2:sequenceFlow id=\"Flow_0k7wg79\" name=\"no\" sourceRef=\"Gateway_0lc9929\" targetRef=\"Event_0tp5xm1\" /><bpmn2:group id=\"Group_0qfprcb\" categoryValueRef=\"CategoryValue_0s69izd\" /><bpmn2:textAnnotation id=\"TextAnnotation_1hy75ap\"><bpmn2:text>Variables are initialized for insert/update counts and possible errors.</bpmn2:text></bpmn2:textAnnotation><bpmn2:association id=\"Association_02vsecy\" sourceRef=\"Activity_1slfbj6\" targetRef=\"TextAnnotation_1hy75ap\" /><bpmn2:association id=\"Association_1ceggq1\" sourceRef=\"Activity_0vzgjbw\" targetRef=\"TextAnnotation_1hy75ap\" /><bpmn2:association id=\"Association_00c3frw\" sourceRef=\"Activity_0log2c9\" targetRef=\"TextAnnotation_1hy75ap\" /><bpmn2:group id=\"Group_0nrqkmh\" categoryValueRef=\"CategoryValue_16gr07m\" /><bpmn2:group id=\"Group_1qmnox8\" categoryValueRef=\"CategoryValue_0omp76s\" /></bpmn2:process><bpmn2:category id=\"Category_12z6h3r\"><bpmn2:categoryValue id=\"CategoryValue_0s69izd\" value=\"Get customer data from Magento\" /></bpmn2:category><bpmn2:category id=\"Category_1lfyqhe\"><bpmn2:categoryValue id=\"CategoryValue_16gr07m\" value=\"Search Dynamics365 for existing contact\" /></bpmn2:category><bpmn2:category id=\"Category_02qjv1v\"><bpmn2:categoryValue id=\"CategoryValue_0omp76s\" value=\"Insert or update customer to Dynamics365 as a contact\" /></bpmn2:category><bpmndi:BPMNDiagram id=\"BPMNDiagram_1\"><bpmndi:BPMNPlane id=\"BPMNPlane_1\" bpmnElement=\"Process_1\"><bpmndi:BPMNShape id=\"_BPMNShape_StartEvent_2\" bpmnElement=\"StartEvent_1\"><dc:Bounds x=\"362\" y=\"240\" width=\"36\" height=\"36\" /><bpmndi:BPMNLabel><dc:Bounds x=\"362\" y=\"276\" width=\"37\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_1yr0scy_di\" bpmnElement=\"Activity_1yr0scy\"><dc:Bounds x=\"500\" y=\"218\" width=\"100\" height=\"80\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Gateway_0lc9929_di\" bpmnElement=\"Gateway_0lc9929\" isMarkerVisible=\"true\"><dc:Bounds x=\"685\" y=\"233\" width=\"50\" height=\"50\" /><bpmndi:BPMNLabel><dc:Bounds x=\"670\" y=\"213\" width=\"80\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_1cxmjw0_di\" bpmnElement=\"Activity_1cxmjw0\"><dc:Bounds x=\"820\" y=\"218\" width=\"100\" height=\"80\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Gateway_12v39a6_di\" bpmnElement=\"Gateway_12v39a6\" isMarkerVisible=\"true\"><dc:Bounds x=\"1005\" y=\"233\" width=\"50\" height=\"50\" /><bpmndi:BPMNLabel><dc:Bounds x=\"985\" y=\"196\" width=\"89\" height=\"27\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Event_0ybcog9_di\" bpmnElement=\"Event_0ybcog9\"><dc:Bounds x=\"1012\" y=\"352\" width=\"36\" height=\"36\" /><bpmndi:BPMNLabel><dc:Bounds x=\"987\" y=\"395\" width=\"87\" height=\"53\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"DataStoreReference_0n959pb_di\" bpmnElement=\"DataStoreReference_0n959pb\"><dc:Bounds x=\"845\" y=\"95\" width=\"50\" height=\"50\" /><bpmndi:BPMNLabel><dc:Bounds x=\"848\" y=\"73\" width=\"44\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_0vzgjbw_di\" bpmnElement=\"Activity_0vzgjbw\"><dc:Bounds x=\"1185\" y=\"243\" width=\"30\" height=\"30\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Event_0k9a9xe_di\" bpmnElement=\"Event_0k9a9xe\"><dc:Bounds x=\"2842\" y=\"240\" width=\"36\" height=\"36\" /><bpmndi:BPMNLabel><dc:Bounds x=\"2823\" y=\"150\" width=\"73\" height=\"80\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_0l4u5gx_di\" bpmnElement=\"Activity_0l4u5gx\" isExpanded=\"true\"><dc:Bounds x=\"1540\" y=\"-60\" width=\"1190\" height=\"690\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Event_0c4jig0_di\" bpmnElement=\"Event_0c4jig0\"><dc:Bounds x=\"1580\" y=\"240\" width=\"36\" height=\"36\" /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_1ek9eyy_di\" bpmnElement=\"Activity_1ek9eyy\"><dc:Bounds x=\"1690\" y=\"218\" width=\"100\" height=\"80\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Gateway_06zes8d_di\" bpmnElement=\"Gateway_06zes8d\" isMarkerVisible=\"true\"><dc:Bounds x=\"1885\" y=\"233\" width=\"50\" height=\"50\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1865\" y=\"183\" width=\"89\" height=\"40\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Event_0q6wv3e_di\" bpmnElement=\"Event_0q6wv3e\"><dc:Bounds x=\"1892\" y=\"352\" width=\"36\" height=\"36\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1868\" y=\"395\" width=\"85\" height=\"66\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"DataStoreReference_0k8ppre_di\" bpmnElement=\"DataStoreReference_0k8ppre\"><dc:Bounds x=\"1715\" y=\"95\" width=\"50\" height=\"50\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1707\" y=\"73\" width=\"67\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Gateway_0g76zci_di\" bpmnElement=\"Gateway_0g76zci\" isMarkerVisible=\"true\"><dc:Bounds x=\"2085\" y=\"233\" width=\"50\" height=\"50\" /><bpmndi:BPMNLabel><dc:Bounds x=\"2142\" y=\"251\" width=\"78\" height=\"27\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_1uzudpi_di\" bpmnElement=\"Activity_1uzudpi\"><dc:Bounds x=\"2240\" y=\"60\" width=\"100\" height=\"80\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_1ufc6oq_di\" bpmnElement=\"Activity_1ufc6oq\"><dc:Bounds x=\"2240\" y=\"380\" width=\"100\" height=\"80\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"DataStoreReference_0db46lu_di\" bpmnElement=\"DataStoreReference_0db46lu\"><dc:Bounds x=\"2265\" y=\"233\" width=\"50\" height=\"50\" /><bpmndi:BPMNLabel><dc:Bounds x=\"2326\" y=\"251\" width=\"67\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Gateway_195oeq8_di\" bpmnElement=\"Gateway_195oeq8\" isMarkerVisible=\"true\"><dc:Bounds x=\"2445\" y=\"75\" width=\"50\" height=\"50\" /><bpmndi:BPMNLabel><dc:Bounds x=\"2441\" y=\"45\" width=\"58\" height=\"27\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Gateway_1ljcq36_di\" bpmnElement=\"Gateway_1ljcq36\" isMarkerVisible=\"true\"><dc:Bounds x=\"2445\" y=\"395\" width=\"50\" height=\"50\" /><bpmndi:BPMNLabel><dc:Bounds x=\"2425\" y=\"373\" width=\"89\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Event_0pz6fnp_di\" bpmnElement=\"Event_0pz6fnp\"><dc:Bounds x=\"2452\" y=\"192\" width=\"36\" height=\"36\" /><bpmndi:BPMNLabel><dc:Bounds x=\"2427\" y=\"235\" width=\"88\" height=\"53\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Event_121tqwh_di\" bpmnElement=\"Event_121tqwh\"><dc:Bounds x=\"2452\" y=\"512\" width=\"36\" height=\"36\" /><bpmndi:BPMNLabel><dc:Bounds x=\"2427\" y=\"555\" width=\"87\" height=\"53\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Event_0e0ioqo_di\" bpmnElement=\"Event_0e0ioqo\"><dc:Bounds x=\"2602\" y=\"82\" width=\"36\" height=\"36\" /><bpmndi:BPMNLabel><dc:Bounds x=\"2577\" y=\"45\" width=\"86\" height=\"27\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Event_0piztv3_di\" bpmnElement=\"Event_0piztv3\"><dc:Bounds x=\"2602\" y=\"402\" width=\"36\" height=\"36\" /><bpmndi:BPMNLabel><dc:Bounds x=\"2580\" y=\"366\" width=\"79\" height=\"27\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNEdge id=\"Flow_19zvcwp_di\" bpmnElement=\"Flow_19zvcwp\"><di:waypoint x=\"2110\" y=\"233\" /><di:waypoint x=\"2110\" y=\"100\" /><di:waypoint x=\"2240\" y=\"100\" /><bpmndi:BPMNLabel><dc:Bounds x=\"2167\" y=\"82\" width=\"17\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0rias41_di\" bpmnElement=\"Flow_0rias41\"><di:waypoint x=\"2110\" y=\"283\" /><di:waypoint x=\"2110\" y=\"420\" /><di:waypoint x=\"2240\" y=\"420\" /><bpmndi:BPMNLabel><dc:Bounds x=\"2169\" y=\"403\" width=\"13\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_11h1gq8_di\" bpmnElement=\"Flow_11h1gq8\"><di:waypoint x=\"1616\" y=\"258\" /><di:waypoint x=\"1690\" y=\"258\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0rcml44_di\" bpmnElement=\"Flow_0rcml44\"><di:waypoint x=\"2340\" y=\"100\" /><di:waypoint x=\"2445\" y=\"100\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_1uus1di_di\" bpmnElement=\"Flow_1uus1di\"><di:waypoint x=\"2340\" y=\"420\" /><di:waypoint x=\"2445\" y=\"420\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_1qto8hb_di\" bpmnElement=\"Flow_1qto8hb\"><di:waypoint x=\"2470\" y=\"125\" /><di:waypoint x=\"2470\" y=\"192\" /><bpmndi:BPMNLabel><dc:Bounds x=\"2475\" y=\"152\" width=\"13\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_1r7vypo_di\" bpmnElement=\"Flow_1r7vypo\"><di:waypoint x=\"2470\" y=\"445\" /><di:waypoint x=\"2470\" y=\"512\" /><bpmndi:BPMNLabel><dc:Bounds x=\"2475\" y=\"473\" width=\"13\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_112ghd3_di\" bpmnElement=\"Flow_112ghd3\"><di:waypoint x=\"1790\" y=\"258\" /><di:waypoint x=\"1885\" y=\"258\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_1vc6wh5_di\" bpmnElement=\"Flow_1vc6wh5\"><di:waypoint x=\"1910\" y=\"283\" /><di:waypoint x=\"1910\" y=\"352\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1919\" y=\"314\" width=\"13\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_1qgq0vb_di\" bpmnElement=\"Flow_1qgq0vb\"><di:waypoint x=\"1935\" y=\"258\" /><di:waypoint x=\"2085\" y=\"258\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1981\" y=\"240\" width=\"17\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_1d44zlu_di\" bpmnElement=\"Flow_1d44zlu\"><di:waypoint x=\"2495\" y=\"100\" /><di:waypoint x=\"2602\" y=\"100\" /><bpmndi:BPMNLabel><dc:Bounds x=\"2540\" y=\"82\" width=\"17\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_037aabj_di\" bpmnElement=\"Flow_037aabj\"><di:waypoint x=\"2495\" y=\"420\" /><di:waypoint x=\"2602\" y=\"420\" /><bpmndi:BPMNLabel><dc:Bounds x=\"2540\" y=\"402\" width=\"17\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNShape id=\"Activity_1slfbj6_di\" bpmnElement=\"Activity_1slfbj6\"><dc:Bounds x=\"1295\" y=\"243\" width=\"30\" height=\"30\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Activity_0log2c9_di\" bpmnElement=\"Activity_0log2c9\"><dc:Bounds x=\"1405\" y=\"243\" width=\"30\" height=\"30\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Event_0tp5xm1_di\" bpmnElement=\"Event_0tp5xm1\"><dc:Bounds x=\"692\" y=\"352\" width=\"36\" height=\"36\" /><bpmndi:BPMNLabel><dc:Bounds x=\"673\" y=\"395\" width=\"75\" height=\"53\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Group_0qfprcb_di\" bpmnElement=\"Group_0qfprcb\"><dc:Bounds x=\"460\" y=\"-10\" width=\"680\" height=\"560\" /><bpmndi:BPMNLabel><dc:Bounds x=\"768\" y=\"-3\" width=\"67\" height=\"40\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"TextAnnotation_1hy75ap_di\" bpmnElement=\"TextAnnotation_1hy75ap\"><dc:Bounds x=\"1260\" y=\"100\" width=\"100\" height=\"84\" /><bpmndi:BPMNLabel /></bpmndi:BPMNShape><bpmndi:BPMNShape id=\"Group_0nrqkmh_di\" bpmnElement=\"Group_0nrqkmh\"><dc:Bounds x=\"1510\" y=\"-130\" width=\"530\" height=\"790\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1734\" y=\"-123\" width=\"84\" height=\"40\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape><bpmndi:BPMNEdge id=\"Flow_0c5fkn9_di\" bpmnElement=\"Flow_0c5fkn9\"><di:waypoint x=\"398\" y=\"258\" /><di:waypoint x=\"500\" y=\"258\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_1q7u17c_di\" bpmnElement=\"Flow_1q7u17c\"><di:waypoint x=\"600\" y=\"258\" /><di:waypoint x=\"685\" y=\"258\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"DataInputAssociation_0n53b8b_di\" bpmnElement=\"DataInputAssociation_0n53b8b\"><di:waypoint x=\"870\" y=\"145\" /><di:waypoint x=\"870\" y=\"218\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0r1iaz9_di\" bpmnElement=\"Flow_0r1iaz9\"><di:waypoint x=\"735\" y=\"258\" /><di:waypoint x=\"820\" y=\"258\" /><bpmndi:BPMNLabel><dc:Bounds x=\"769\" y=\"240\" width=\"17\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_1bmlwso_di\" bpmnElement=\"Flow_1bmlwso\"><di:waypoint x=\"920\" y=\"258\" /><di:waypoint x=\"1005\" y=\"258\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0pzf9iy_di\" bpmnElement=\"Flow_0pzf9iy\"><di:waypoint x=\"1030\" y=\"283\" /><di:waypoint x=\"1030\" y=\"352\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1039\" y=\"315\" width=\"13\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_1p3uohc_di\" bpmnElement=\"Flow_1p3uohc\"><di:waypoint x=\"1055\" y=\"258\" /><di:waypoint x=\"1185\" y=\"258\" /><bpmndi:BPMNLabel><dc:Bounds x=\"1112\" y=\"240\" width=\"17\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"DataOutputAssociation_0antgtg_di\" bpmnElement=\"DataOutputAssociation_0antgtg\"><di:waypoint x=\"2290\" y=\"140\" /><di:waypoint x=\"2290\" y=\"233\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"DataOutputAssociation_0yx5lq2_di\" bpmnElement=\"DataOutputAssociation_0yx5lq2\"><di:waypoint x=\"2290\" y=\"380\" /><di:waypoint x=\"2290\" y=\"283\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"DataInputAssociation_0gxa8zc_di\" bpmnElement=\"DataInputAssociation_0gxa8zc\"><di:waypoint x=\"1740\" y=\"145\" /><di:waypoint x=\"1740\" y=\"218\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_006vj5a_di\" bpmnElement=\"Flow_006vj5a\"><di:waypoint x=\"2730\" y=\"258\" /><di:waypoint x=\"2842\" y=\"258\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_1hhflbg_di\" bpmnElement=\"Flow_1hhflbg\"><di:waypoint x=\"1215\" y=\"258\" /><di:waypoint x=\"1295\" y=\"258\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_1qda89b_di\" bpmnElement=\"Flow_1qda89b\"><di:waypoint x=\"1325\" y=\"258\" /><di:waypoint x=\"1405\" y=\"258\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_1c2md4r_di\" bpmnElement=\"Flow_1c2md4r\"><di:waypoint x=\"1435\" y=\"258\" /><di:waypoint x=\"1540\" y=\"258\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Flow_0k7wg79_di\" bpmnElement=\"Flow_0k7wg79\"><di:waypoint x=\"710\" y=\"283\" /><di:waypoint x=\"710\" y=\"352\" /><bpmndi:BPMNLabel><dc:Bounds x=\"719\" y=\"314\" width=\"13\" height=\"14\" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Association_02vsecy_di\" bpmnElement=\"Association_02vsecy\"><di:waypoint x=\"1310\" y=\"243\" /><di:waypoint x=\"1310\" y=\"184\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Association_1ceggq1_di\" bpmnElement=\"Association_1ceggq1\"><di:waypoint x=\"1212\" y=\"247\" /><di:waypoint x=\"1279\" y=\"184\" /></bpmndi:BPMNEdge><bpmndi:BPMNEdge id=\"Association_00c3frw_di\" bpmnElement=\"Association_00c3frw\"><di:waypoint x=\"1408\" y=\"247\" /><di:waypoint x=\"1341\" y=\"184\" /></bpmndi:BPMNEdge><bpmndi:BPMNShape id=\"Group_1qmnox8_di\" bpmnElement=\"Group_1qmnox8\"><dc:Bounds x=\"2070\" y=\"-130\" width=\"690\" height=\"790\" /><bpmndi:BPMNLabel><dc:Bounds x=\"2374\" y=\"-123\" width=\"82\" height=\"53\" /></bpmndi:BPMNLabel></bpmndi:BPMNShape></bpmndi:BPMNPlane></bpmndi:BPMNDiagram></bpmn2:definitions>",
					"ElementParameters": "[{\"Id\":\"StartEvent_1\",\"Type\":0,\"Parameters\":{},\"SelectedTypeId\":\"ManualTrigger\",\"PromoteResultAs\":null,\"Name\":\"Manual\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_1yr0scy\",\"Type\":1,\"Parameters\":{\"input\":{\"Method\":{\"mode\":\"select\",\"value\":\"POST\"},\"ResultMethod\":{\"mode\":\"select\",\"value\":\"JToken\"},\"Url\":{\"mode\":\"text\",\"value\":\"{{#var.MagentoBaseUrl}}/index.php/rest/V1/integration/admin/token\"},\"Message\":{\"mode\":\"text\",\"value\":\"{\\r\\n    \\\"username\\\": {{\\\"\\\\\\\"\\\" + #var.MagentoUser + \\\"\\\\\\\"\\\"}},\\r\\n    \\\"password\\\": {{\\\"\\\\\\\"\\\" + #var.MagentoPassword.Replace(\\\"\\\\\\\"\\\", \\\"\\\\\\\\\\\\\\\"\\\") + \\\"\\\\\\\"\\\"}}\\r\\n}\"},\"Headers\":[{\"Name\":{\"mode\":\"text\",\"value\":\"Content-Type\"},\"Value\":{\"mode\":\"text\",\"value\":\"application/json\"}}]},\"options\":{\"Authentication\":{\"mode\":\"select\",\"value\":\"None\"},\"Username\":{\"mode\":\"text\",\"value\":\"\"},\"Password\":{\"mode\":\"text\",\"value\":\"\"},\"Token\":{\"mode\":\"text\",\"value\":\"\"},\"ClientCertificateSource\":{\"mode\":\"select\",\"value\":\"CertificateStore\"},\"ClientCertificateFilePath\":{\"mode\":\"text\",\"value\":\"\"},\"ClientCertificateInBase64\":{\"mode\":\"text\",\"value\":\"\"},\"ClientCertificateKeyPhrase\":{\"mode\":\"text\",\"value\":\"\"},\"CertificateThumbprint\":{\"mode\":\"text\",\"value\":\"\"},\"LoadEntireChainForCertificate\":{\"mode\":\"toggle\",\"value\":true},\"ConnectionTimeoutSeconds\":{\"mode\":\"integer\",\"value\":30},\"FollowRedirects\":{\"mode\":\"toggle\",\"value\":true},\"AllowInvalidCertificate\":{\"mode\":\"toggle\",\"value\":false},\"AllowInvalidResponseContentTypeCharSet\":{\"mode\":\"toggle\",\"value\":false},\"ThrowExceptionOnErrorResponse\":{\"mode\":\"toggle\",\"value\":false},\"AutomaticCookieHandling\":{\"mode\":\"toggle\",\"value\":true}},\"cancellationToken\":null},\"SelectedTypeId\":\"/ProcessTask/d2f2020e-4ce6-4e5f-879f-ef34e57c9fca/v1\",\"PromoteResultAs\":null,\"Name\":\"Obtain authorisation token from Magento\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":false,\"MaxRetryCount\":null,\"ShouldNotLogResult\":true,\"ShouldDispose\":null},{\"Id\":\"Gateway_0lc9929\",\"Type\":2,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"#result.StatusCode == 200\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Token received?\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Flow_0r1iaz9\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"yes\",\"Description\":null,\"IsDefault\":false,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_1cxmjw0\",\"Type\":1,\"Parameters\":{\"input\":{\"Method\":{\"mode\":\"select\",\"value\":\"GET\"},\"ResultMethod\":{\"mode\":\"select\",\"value\":\"JToken\"},\"Url\":{\"mode\":\"text\",\"value\":\"{{#var.MagentoBaseUrl}}/rest/V1/customers/search?searchCriteria[sortOrders][0]\"},\"Message\":{\"mode\":\"text\",\"value\":\"\"},\"Headers\":[]},\"options\":{\"Authentication\":{\"mode\":\"select\",\"value\":\"OAuth\"},\"Username\":{\"mode\":\"text\",\"value\":\"\"},\"Password\":{\"mode\":\"text\",\"value\":\"\"},\"Token\":{\"mode\":\"csharp\",\"value\":\"#result[Obtain authorisation token from Magento].Body\"},\"ClientCertificateSource\":{\"mode\":\"select\",\"value\":\"CertificateStore\"},\"ClientCertificateFilePath\":{\"mode\":\"text\",\"value\":\"\"},\"ClientCertificateInBase64\":{\"mode\":\"text\",\"value\":\"\"},\"ClientCertificateKeyPhrase\":{\"mode\":\"text\",\"value\":\"\"},\"CertificateThumbprint\":{\"mode\":\"text\",\"value\":\"\"},\"LoadEntireChainForCertificate\":{\"mode\":\"toggle\",\"value\":true},\"ConnectionTimeoutSeconds\":{\"mode\":\"integer\",\"value\":30},\"FollowRedirects\":{\"mode\":\"toggle\",\"value\":true},\"AllowInvalidCertificate\":{\"mode\":\"toggle\",\"value\":false},\"AllowInvalidResponseContentTypeCharSet\":{\"mode\":\"toggle\",\"value\":false},\"ThrowExceptionOnErrorResponse\":{\"mode\":\"toggle\",\"value\":false},\"AutomaticCookieHandling\":{\"mode\":\"toggle\",\"value\":true}},\"cancellationToken\":null},\"SelectedTypeId\":\"/ProcessTask/d2f2020e-4ce6-4e5f-879f-ef34e57c9fca/v1\",\"PromoteResultAs\":null,\"Name\":\"Get customers from Magento\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":false,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Gateway_12v39a6\",\"Type\":2,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"#result.StatusCode == 200\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Get from Magento successful?\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Event_0ybcog9\",\"Type\":6,\"Parameters\":{\"expression\":{\"mode\":\"text\",\"value\":\"An exception occurred when trying to get customer data from Magento: {{#result[Get customers from Magento].Body.message}}\"},\"bypassGlobalExceptionHandler\":{\"mode\":\"toggle\",\"value\":true}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":null,\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Flow_0pzf9iy\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"no\",\"Description\":null,\"IsDefault\":true,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"DataStoreReference_0n959pb\",\"Type\":22,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Magento\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Flow_1p3uohc\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"yes\",\"Description\":null,\"IsDefault\":false,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_0vzgjbw\",\"Type\":12,\"Parameters\":{\"variableName\":\"errors\",\"variableExpression\":{\"mode\":\"csharp\",\"value\":\"\\\"\\\"\"},\"shouldAssignVariable\":{\"mode\":\"toggle\",\"value\":true}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Initialize error variable\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Event_0c4jig0\",\"Type\":13,\"Parameters\":{},\"SelectedTypeId\":\"\",\"PromoteResultAs\":null,\"Name\":null,\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_0l4u5gx\",\"Type\":10,\"Parameters\":{\"variable\":\"magentoCustomer\",\"expression\":{\"mode\":\"csharp\",\"value\":\"#result[Get customers from Magento].Body.items\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"For each Magento customer\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Gateway_0g76zci\",\"Type\":2,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"#result[Get contact information from Dynamics365].Data.value.Count > 0\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Contact already exists?\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Flow_19zvcwp\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"yes\",\"Description\":null,\"IsDefault\":false,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_1uzudpi\",\"Type\":1,\"Parameters\":{\"input\":{\"ClientId\":{\"mode\":\"csharp\",\"value\":\"#var.Dynamics365ClientId\"},\"TenantId\":{\"mode\":\"csharp\",\"value\":\"#var.Dynamics365TenantId\"},\"ClientSecret\":{\"mode\":\"csharp\",\"value\":\"#var.Dynamics365ClientSecret\"},\"Dynamics365Url\":{\"mode\":\"csharp\",\"value\":\"#var.Dynamics365Url\"},\"Method\":{\"mode\":\"select\",\"value\":\"PATCH\"},\"Path\":{\"mode\":\"text\",\"value\":\"contacts({{#result[Get contact information from Dynamics365].Data.value[0].contactid}})\"},\"Payload\":{\"mode\":\"text\",\"value\":\"{\\r\\n\\r\\n    \\\"firstname\\\": \\\"{{#var.magentoCustomer.firstname}}\\\",\\r\\n    \\\"lastname\\\": \\\"{{#var.magentoCustomer.lastname}}\\\",\\r\\n    \\\"emailaddress1\\\": \\\"{{#var.magentoCustomer.email}}\\\",\\r\\n    \\\"salutation\\\": \\\"{{#var.magentoCustomer.prefix}}\\\",\\r\\n    \\\"address1_line1\\\": \\\"{{#var.magentoCustomer.addresses.Count > 0 ? #var.magentoCustomer.addresses[0].street[0] : null}}\\\",\\r\\n    \\\"address1_country\\\": \\\"{{#var.magentoCustomer.addresses.Count > 0 ? #var.magentoCustomer.addresses[0].country_id : null}}\\\",\\r\\n    \\\"address1_city\\\": \\\"{{#var.magentoCustomer.addresses.Count > 0 ? #var.magentoCustomer.addresses[0].city : null}}\\\",\\r\\n    \\\"address1_postalcode\\\": \\\"{{#var.magentoCustomer.addresses.Count > 0 ? #var.magentoCustomer.addresses[0].postcode : null}}\\\",\\r\\n    \\\"mobilephone\\\": \\\"{{#var.magentoCustomer.addresses.Count > 0 ? #var.magentoCustomer.addresses[0].telephone : null}}\\\",\\r\\n    \\\"telephone1\\\": \\\"{{#var.magentoCustomer.addresses.Count > 0 ? #var.magentoCustomer.addresses[0].telephone : null}}\\\",\\r\\n    \\\"address2_line1\\\": \\\"{{#var.magentoCustomer.addresses.Count > 1 ? #var.magentoCustomer.addresses[1].street[0] : null}}\\\",\\r\\n    \\\"address2_country\\\": \\\"{{#var.magentoCustomer.addresses.Count > 1 ? #var.magentoCustomer.addresses[1].country_id : null}}\\\",\\r\\n    \\\"address2_city\\\": \\\"{{#var.magentoCustomer.addresses.Count > 1 ? #var.magentoCustomer.addresses[1].city : null}}\\\",\\r\\n    \\\"address2_postalcode\\\": \\\"{{#var.magentoCustomer.addresses.Count > 1 ? #var.magentoCustomer.addresses[1].postcode : null}}\\\"\\r\\n}\"}},\"options\":{\"ApiVersion\":{\"mode\":\"text\",\"value\":\"v9.1\"},\"ThrowExceptionOnErrorResponse\":{\"mode\":\"toggle\",\"value\":false}},\"cancellationToken\":null},\"SelectedTypeId\":\"/ProcessTask/81e6cd26-703c-4622-bbad-9743db2a6ae6/v2\",\"PromoteResultAs\":null,\"Name\":\"Update contact on Dynamics365\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":false,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Flow_0rias41\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"no\",\"Description\":null,\"IsDefault\":true,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_1ufc6oq\",\"Type\":1,\"Parameters\":{\"input\":{\"ClientId\":{\"mode\":\"csharp\",\"value\":\"#var.Dynamics365ClientId\"},\"TenantId\":{\"mode\":\"csharp\",\"value\":\"#var.Dynamics365TenantId\"},\"ClientSecret\":{\"mode\":\"csharp\",\"value\":\"#var.Dynamics365ClientSecret\"},\"Dynamics365Url\":{\"mode\":\"csharp\",\"value\":\"#var.Dynamics365Url\"},\"Method\":{\"mode\":\"select\",\"value\":\"POST\"},\"Path\":{\"mode\":\"text\",\"value\":\"contacts\"},\"Payload\":{\"mode\":\"text\",\"value\":\"{\\r\\n\\r\\n    \\\"firstname\\\": \\\"{{#var.magentoCustomer.firstname}}\\\",\\r\\n    \\\"lastname\\\": \\\"{{#var.magentoCustomer.lastname}}\\\",\\r\\n    \\\"emailaddress1\\\": \\\"{{#var.magentoCustomer.email}}\\\",\\r\\n    \\\"salutation\\\": \\\"{{#var.magentoCustomer.prefix}}\\\",\\r\\n    \\\"address1_line1\\\": \\\"{{#var.magentoCustomer.addresses.Count > 0 ? #var.magentoCustomer.addresses[0].street[0] : null}}\\\",\\r\\n    \\\"address1_country\\\": \\\"{{#var.magentoCustomer.addresses.Count > 0 ? #var.magentoCustomer.addresses[0].country_id : null}}\\\",\\r\\n    \\\"address1_city\\\": \\\"{{#var.magentoCustomer.addresses.Count > 0 ? #var.magentoCustomer.addresses[0].city : null}}\\\",\\r\\n    \\\"address1_postalcode\\\": \\\"{{#var.magentoCustomer.addresses.Count > 0 ? #var.magentoCustomer.addresses[0].postcode : null}}\\\",\\r\\n    \\\"mobilephone\\\": \\\"{{#var.magentoCustomer.addresses.Count > 0 ? #var.magentoCustomer.addresses[0].telephone : null}}\\\",\\r\\n    \\\"telephone1\\\": \\\"{{#var.magentoCustomer.addresses.Count > 0 ? #var.magentoCustomer.addresses[0].telephone : null}}\\\",\\r\\n    \\\"address2_line1\\\": \\\"{{#var.magentoCustomer.addresses.Count > 1 ? #var.magentoCustomer.addresses[1].street[0] : null}}\\\",\\r\\n    \\\"address2_country\\\": \\\"{{#var.magentoCustomer.addresses.Count > 1 ? #var.magentoCustomer.addresses[1].country_id : null}}\\\",\\r\\n    \\\"address2_city\\\": \\\"{{#var.magentoCustomer.addresses.Count > 1 ? #var.magentoCustomer.addresses[1].city : null}}\\\",\\r\\n    \\\"address2_postalcode\\\": \\\"{{#var.magentoCustomer.addresses.Count > 1 ? #var.magentoCustomer.addresses[1].postcode : null}}\\\"\\r\\n}\"}},\"options\":{\"ApiVersion\":{\"mode\":\"text\",\"value\":\"v9.1\"},\"ThrowExceptionOnErrorResponse\":{\"mode\":\"toggle\",\"value\":false}},\"cancellationToken\":null},\"SelectedTypeId\":\"/ProcessTask/81e6cd26-703c-4622-bbad-9743db2a6ae6/v2\",\"PromoteResultAs\":null,\"Name\":\"Insert contact to Dynamics365\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":false,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_1ek9eyy\",\"Type\":1,\"Parameters\":{\"input\":{\"ClientId\":{\"mode\":\"csharp\",\"value\":\"#var.Dynamics365ClientId\"},\"TenantId\":{\"mode\":\"csharp\",\"value\":\"#var.Dynamics365TenantId\"},\"ClientSecret\":{\"mode\":\"csharp\",\"value\":\"#var.Dynamics365ClientSecret\"},\"Dynamics365Url\":{\"mode\":\"csharp\",\"value\":\"#var.Dynamics365Url\"},\"Method\":{\"mode\":\"select\",\"value\":\"GET\"},\"Path\":{\"mode\":\"text\",\"value\":\"contacts?$filter=emailaddress1 eq '{{#var.magentoCustomer.email}}'\"},\"Payload\":{\"mode\":\"text\",\"value\":\"\"}},\"options\":{\"ApiVersion\":{\"mode\":\"text\",\"value\":\"v9.1\"},\"ThrowExceptionOnErrorResponse\":{\"mode\":\"toggle\",\"value\":false}},\"cancellationToken\":null},\"SelectedTypeId\":\"/ProcessTask/81e6cd26-703c-4622-bbad-9743db2a6ae6/v2\",\"PromoteResultAs\":null,\"Name\":\"Get contact information from Dynamics365\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":false,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"DataStoreReference_0db46lu\",\"Type\":22,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Dynamics365\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Gateway_195oeq8\",\"Type\":2,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"#result.Success\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Update successful?\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Gateway_1ljcq36\",\"Type\":2,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"#result.Success\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Insert successful?\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Flow_1qto8hb\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"no\",\"Description\":null,\"IsDefault\":true,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Event_0pz6fnp\",\"Type\":5,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"#var.errors += $\\\"\\\\nAn error occurred when updating the contact {#var.magentoCustomer.firstname} {#var.magentoCustomer.lastname} on Dynamics365:\\\\n{#result.ErrorMessage}\\\"\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":null,\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Flow_1r7vypo\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"no\",\"Description\":null,\"IsDefault\":true,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Event_121tqwh\",\"Type\":5,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"#var.errors += $\\\"\\\\nAn error occurred when inserting the contact {#var.magentoCustomer.firstname} {#var.magentoCustomer.lastname} into Dynamics365:\\\\n{#result.ErrorMessage}\\\"\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":null,\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"FrendsTestElementId\",\"Type\":19,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Test\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Event_0k9a9xe\",\"Type\":5,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"#var.errors == \\\"\\\" ? $\\\"{#var.insertedCount} customers inserted and {#var.updatedCount} updated successfully from Magento to Dynamics365.\\\" : $\\\"{#var.insertedCount} customers inserted and {#var.updatedCount} updated from Magento to Dynamics365. The following errors occurred: \\\\n{#var.errors}\\\"\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":null,\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Gateway_06zes8d\",\"Type\":2,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"#result.Success\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Contact information gotten successfully?\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Flow_1vc6wh5\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"no\",\"Description\":null,\"IsDefault\":true,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Event_0q6wv3e\",\"Type\":5,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"#var.errors += $\\\"\\\\nAn error occurred when fetching contact information from Dynamics365: \\\\n{#result.ErrorMessage}\\\"\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":null,\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"DataStoreReference_0k8ppre\",\"Type\":22,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Dynamics365\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Flow_1qgq0vb\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"yes\",\"Description\":null,\"IsDefault\":false,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_1slfbj6\",\"Type\":12,\"Parameters\":{\"variableName\":\"updatedCount\",\"variableExpression\":{\"mode\":\"csharp\",\"value\":\"0\"},\"shouldAssignVariable\":{\"mode\":\"toggle\",\"value\":true}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Initialize update count\",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Activity_0log2c9\",\"Type\":12,\"Parameters\":{\"variableName\":\"insertedCount\",\"variableExpression\":{\"mode\":\"csharp\",\"value\":\"0\"},\"shouldAssignVariable\":{\"mode\":\"toggle\",\"value\":true}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"Initialize insert count \",\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Flow_1d44zlu\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"yes\",\"Description\":null,\"IsDefault\":false,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Event_0e0ioqo\",\"Type\":5,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"#var.updatedCount++\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":null,\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Flow_037aabj\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"yes\",\"Description\":null,\"IsDefault\":false,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Event_0piztv3\",\"Type\":5,\"Parameters\":{\"expression\":{\"mode\":\"csharp\",\"value\":\"#var.insertedCount++\"}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":null,\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Event_0tp5xm1\",\"Type\":6,\"Parameters\":{\"expression\":{\"mode\":\"text\",\"value\":\"An exception occurred when attempting to obtain the authorsation token from Magento: {{#result[Obtain authorisation token from Magento].Body.message}}\"},\"bypassGlobalExceptionHandler\":{\"mode\":\"toggle\",\"value\":true}},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":null,\"Description\":null,\"IsDefault\":null,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null},{\"Id\":\"Flow_0k7wg79\",\"Type\":4,\"Parameters\":{},\"SelectedTypeId\":null,\"PromoteResultAs\":null,\"Name\":\"no\",\"Description\":null,\"IsDefault\":true,\"ShouldRetry\":null,\"MaxRetryCount\":null,\"ShouldNotLogResult\":null,\"ShouldDispose\":null}]",
					"ManualTriggerJson": "[]",
					"IsSubprocess": false,
					"TriggersJson": "[{\"$type\":\"ManualTrigger\",\"config\":{},\"name\":\"Manual\",\"id\":\"StartEvent_1\",\"shouldNotLogParameters\":null}]",
					"AssemblyName": null,
					"PackageId": null,
					"PackageVersion": null,
					"UsedTasksJson": "[\"/ProcessTask/D2F2020E-4CE6-4E5F-879F-EF34E57C9FCA/v1\",\"/ProcessTask/81E6CD26-703C-4622-BBAD-9743DB2A6AE6/v2\"]",
					"UsedSubprocessesJson": "{}",
					"ProcessExecutionVersion": "",
					"FrendsVersion": "5.7.3.1743",
					"TargetFramework": "net8.0",
					"StaticRequiredEnvironmentVariables": [],
					"RequiredEnvironmentVariables": [],
					"PromotedResultVariablesJson": "[]",
					"MajorVersion": 1,
					"MinorVersion": 0,
					"IsForMonitoringRule": false,
					"ProcessVariablesJson": null
				},
				"LinkedTasks": {
					"076c1572-9f9c-4309-922b-6b37b10f5531": [
						{
							"Id": "d2f2020e-4ce6-4e5f-879f-ef34e57c9fca",
							"PackageId": "Frends.HTTP.Request",
							"PackageVersion": "1.1.2",
							"Name": "Frends.HTTP.Request.HTTP.Request(Input, Options, CancellationToken)",
							"FrameworkIdentifier": ".NETCoreApp"
						},
						{
							"Id": "81e6cd26-703c-4622-bbad-9743db2a6ae6",
							"PackageId": "Frends.MicrosoftDynamics365.Request",
							"PackageVersion": "1.1.0",
							"Name": "Frends.MicrosoftDynamics365.Request.MicrosoftDynamics365.Request(Input, Options, CancellationToken)",
							"FrameworkIdentifier": ".NETCoreApp"
						}
					]
				},
				"LinkedSubProcess": {},
				"Version": "Acc41"
			}
		}
	]
}